
const port = 4001
const Koa = require('koa');
const app = new Koa();
const koajwt = require("koa-jwt")
var cors = require('koa-cors');
app.use(cors())
const koaBody = require('koa-body');
app.use(koaBody(
  {
    multipart: true,
    formidable: {
      maxFileSize: 1024 * 1024 * 2000
    }
  }
));
const serve = require('koa-static');
app.use(serve(__dirname + '/static'));




// import {router} from './router/router'
const router = require("./router")





app
  .use(router.routes())
  .use(router.allowedMethods());

app.listen(port, () => {
  console.log('server is runing on ' + port + ' port....');
});